import axios from "axios";

//eslint-disable-next-line
export default {
    // 获取订单信息
    get: ({ userId, genre }) =>
        axios.get('/api/indent/get', {
            params: { userId, genre }
        })
            .then(({ data }) => data),
    // 修改订单状态
    put: ({ Id }) =>
        axios.put('/api/indent/put', { Id })
            .then(({ data }) => data),
    // 判断是否有自提点
    address: ({ userId }) =>
        axios.get('/api/indent/address', {
            params: { userId }
        })
            .then(({ data }) => data),
    // 删除订单
    deleteId: ({ Id }) =>
        axios.delete('/api/indent/delete', { data: { Id } })
            .then(({ data }) => data),
    // 新增订单
    postAdd: ({userId, information,total ,time ,state}) =>
        axios.post('/api/indent/post', {
            userId, information,total ,time ,state
        })
            .then(({ data }) => data),
}